
<?php
switch ($pregunta->TipoPregunta) {
    case 1:
        ?>
        <div  id="<?php echo $pregunta->idPregunta; ?>"> 
            <div class="pull-right">
                <div class="btn-group">
                    <a class="btn" onclick="eliminar(<?php echo $pregunta->idPregunta; ?>,<?php echo $pregunta->TipoPregunta; ?>,0);"><i class="icon-remove "></i></a>
                     <a class="btn btn-success" onclick="edit(<?php echo $pregunta->idPregunta; ?>);"><i class="icon-pencil"></i></a>                     
                </div>
            </div>
            
            <label name="txtEncabezado" class="control-label alert-success editables"  ><?php echo $pregunta->Texto; ?></label>
            <label name="txtSubEncabezado" class="control-label editables"><?php echo $pregunta->TextoAuxiliar; ?></label>
            <input name="txtRespuesta"  disabled="">    
            <input class="json" style="display:none;" value='<?php echo (json_encode($pregunta).";".json_encode($validacion));?>'/>
           
            <?php
                    
            break;
        case 2:
            ?>
            <div  id="<?php echo $pregunta->idPregunta; ?>"> 
                <div class="pull-right">
                            <div class="btn-group">
                                <a class="btn" onclick="eliminar(<?php echo $pregunta->idPregunta; ?>,<?php echo $pregunta->TipoPregunta; ?>,0);" ><i class="icon-remove "></i></a>
                                 <a class="btn btn-success" onclick="edit(<?php echo $pregunta->idPregunta; ?>);"><i class="icon-pencil"></i></a>

                            </div>
                        </div>
                <label name="txtEncabezado" class="control-label alert-success editables"  ><?php echo $pregunta->Texto; ?></label>
                <label name="txtSubEncabezado" class="control-label editables"><?php echo $pregunta->TextoAuxiliar; ?></label>
                <div id="radioGrup" class="controls">                          
                    <?php
                    foreach ($options as $row) {
                        ?><div><input type="radio" name="group1" disabled="" >  <span><?php echo $row->Texto; ?></span><br></div>                   
                    <?php }
                    ?>   
                </div> 
                <input class="json" style="display:none;" value='<?php  echo (json_encode($pregunta).";".json_encode($options));?>'/>
                <?php
               
                break;
            case 3:
                ?>
                <div  id="<?php echo $pregunta->idPregunta; ?>"> 
                    <div class="pull-right">
                                <div class="btn-group">
                                    <a class="btn" onclick="eliminar(<?php echo $pregunta->idPregunta; ?>,<?php echo $pregunta->TipoPregunta; ?>,0);" onclick="return eliminar();" ><i class="icon-remove "></i></a>
                                    <a class="btn btn-success" onclick="edit(<?php echo $pregunta->idPregunta; ?>);"><i class="icon-pencil"></i></a>

                                </div>
                            </div>
                    <label name="txtEncabezado" class="control-label alert-success editables"  ><?php echo $pregunta->Texto; ?></label>
                    <label name="txtSubEncabezado" class="control-label editables"><?php echo $pregunta->TextoAuxiliar; ?></label>
                    <div id="checkGrup" class="controls">
                    <?php
                        foreach ($options as $row) {
                            ?><div><input type="checkbox" name="group1" disabled="" > <span><?php echo $row->Texto; ?></span><br></div>                    
                        <?php }
                        ?>   
                    </div>  
                    <input class="json" style="display:none;" value='<?php  echo (json_encode($pregunta).";".json_encode($options));?>'/>
                    <?php
                    break;
break;
                case 4:
                    if ($inicio == 1) {
                        ?>   
                        <div  id="<?php echo $pregunta->SubSeccion; ?>"> 
                            <div class="pull-right">
                                <div class="btn-group">
                                    <a class="btn" onclick="eliminar(0,<?php echo $pregunta->TipoPregunta; ?>,<?php echo $pregunta->SubSeccion;?>);" ><i class="icon-remove "></i></a>
                                    <a class="btn btn-success" onclick="edit(<?php echo $pregunta->SubSeccion; ?>);"><i class="icon-pencil"></i></a>

                                </div>
                            </div>
                            <label name="txtEncabezado" class="control-label alert-success editables" ><?php echo $pregunta->tabla; ?></label>           
                            <table class="table table-bordered  tabla1"> 
                                <thead>
                                    <tr class="alert-info">
                                        <th class="tdVista">F/C</th>
                                        <?php
                                        foreach ($options as $row) {
                                            ?><th class="tdVista"><label name="txtcab2" class="control-label editables2"><?php echo $row->Texto; ?></label></th><?php }
                                        ?>                                                                
                                    </tr>        
                                </thead>
                                <tbody>
                                <?php } ?>                     
                                <tr>
                                    <td><label name="txtcab2" class="control-label editables3 row5"><?php echo $pregunta->Texto;
                        ;
                                ?></label></td>
                                    <?php
                                    foreach ($options as $row) {
                                         if($row->Otro==1){
                                             ?>
                                           <td><input type="text" name="group1" disabled="" class="editables3"></td>  
                                                 <?php
                                         }else{
                                         ?><td><input type="radio" name="group1" disabled="" ></td><?php
                                         }
                                        }
                                ?>                                                    
                                </tr>
        <?php if ($footer == 1) { ?>
                                </tbody>
                            </table>
                              <input class="json" style="display:none;" value='<?php  echo (json_encode($pregunta).";".json_encode($options));?>'/>

                        <?php } ?>
                          <?php
                        
                        break;

                    case 5:
                        if ($inicio == 1) {
                            ?>   
                            <div  id="<?php echo $pregunta->SubSeccion; ?>"> 
                                <div class="pull-right">
                                    <div class="btn-group">
                                        <a class="btn" onclick="eliminar(0,<?php echo $pregunta->TipoPregunta; ?>,<?php echo $pregunta->SubSeccion;?>);" ><i class="icon-remove "></i></a>
                                        <a class="btn btn-success" onclick="edit(<?php echo $pregunta->SubSeccion; ?>);"><i class="icon-pencil"></i></a>

                                    </div>
                                </div>

                                <label name="txtEncabezado" class="control-label alert-success editables" ><?php echo $pregunta->tabla; ?></label>           
                                <table  class="table table-bordered  tabla1"> 
                                    <thead>
                                        <tr class="alert-info">
                                            <th class="tdVista">F/C</th>
                                            <?php
                                            foreach ($options as $row) {
                                                ?><th class="tdVista"><label name="txtcab2" class="control-label editables2"><?php echo $row->Texto; ?></label></th><?php }
                            ?>                                                                
                                        </tr>        
                                    </thead>
                                    <tbody>
        <?php } ?>                     
                                    <tr>
                                        <td><label name="txtcab2" class="control-label editables3 row5"><?php echo $pregunta->Texto;
        ;
        ?></label></td>
                                                <?php
                                                foreach ($options as $row) {
                                                    if($row->Otro==1){
                                                        ?>
                                                      <td><input type="text" name="group1" disabled="" class="editables3"></td>  
                                                            <?php
                                                    }else{
                                                    
                                                    ?><td><input type="checkbox" name="group1" disabled="" ></td><?php }}
                                                ?>                                                    
                                    </tr>
                            <?php if ($footer == 1) { ?>
                                    </tbody>
                                </table>
                                <input class="json" style="display:none;" value='<?php  echo (json_encode($pregunta).";".json_encode($options));?>'/>
                            <?php } ?>
                                
                            <?php
                            break;

                        case 6:
                            if ($inicio == 1) {
                                ?>   
                                <div  id="<?php echo $pregunta->SubSeccion; ?>"> 
                                    <div class="pull-right">
                                        <div class="btn-group">
                                            <a class="btn" href="<?php echo base_url()?>encuestas/edicion_encuestas_controller/eliminarPregunta/<?php echo $pregunta->idPregunta; ?>/<?php echo $pregunta->TipoPregunta; ?>/<?php echo $pregunta->SubSeccion; ?>" onclick="return eliminar();" ><i class="icon-remove "></i></a>
                                            <a class="btn btn-success" onclick="edit(<?php echo $pregunta->SubSeccion; ?>);"><i class="icon-pencil" ></i></a>

                                        </div>
                                    </div>


                                    <label name="txtEncabezado" class="control-label alert-success editables" ><?php echo $pregunta->tabla; ?></label>           
                                    <table  class="table table-bordered   tabla1"> 
                                        <thead>
                                            <tr class="alert-info">
                                                <th class="tdVista">F/C</th>
                                                <?php
                                                foreach ($options as $row) {
                                                    ?><th class="tdVista"><label name="txtcab2" class="control-label editables2"><?php echo $row->Texto; ?></label></th><?php }
                                                ?>                                                                
                                            </tr>        
                                        </thead>
                                        <tbody>
                                                    <?php } ?>                     
                                        <tr>
                                            <td><label name="txtcab2" class="control-label editables2 row5"><?php echo $pregunta->Texto;
                                                    ;
                                                    ?></label></td>
                                                    <?php
                                                    foreach ($options as $row) {
                                                        ?><td><input type="text" name="group1" disabled=""  class="editables3"></td><?php }
                            ?>                                                    
                                        </tr>
                                <?php if ($footer == 1) { ?>
                                        </tbody>
                                          <input class="json" style="display:none;" value='<?php  echo (json_encode($pregunta).";".json_encode($validacion).";".json_encode($options));?>'/>
                                    </table>
                                <?php } ?>
                                <?php
                                break;
                        }
                        ?>

                    <?PHP if ($footer == 1) { ?>        

                        </div>
<?PHP } ?>
